home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 1 / MacMania 1.toast / Hypercard / HyperCard' More / C-D / ClassroomAdministr / Classroom Administrator / SetUpStack / card_2846.txt < prev    next >
Encoding:
Text File  |  1988-01-07  |  6.7 KB  |  282 lines

  1. -- card: 2846 from stack: in
  2. -- bmap block id: 6744
  3. -- flags: 4000
  4. -- background id: 2754
  5. -- name: Configuration
  6.  
  7.  
  8. -- part 3 (button)
  9. -- low flags: 00
  10. -- high flags: 8003
  11. -- rect: left=382 top=128 right=156 bottom=464
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Configure
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   global NumStudents,A,B,C,D,ClassName, period
  23.   put card field "B" into B
  24.   put card field "A" into A
  25.   put card field "C" into C
  26.   put card field "D" into D
  27.   Answer "Configure all classes?" with "OK" or "Cancel"
  28.   if it is "Cancel" then exit mouseUp
  29.   put number of lines in card field "Title" into numClasses
  30.   repeat with x = 1 to numClasses
  31.     go to setupstack
  32.     go to card "configuration" of setupstack
  33.     put line x of card field "NumStudents" into NumStudents
  34.     put line x of card field "Title" into ClassName
  35.     put line x of card field "Period" into period
  36.     if x > 1 and x < numClasses then
  37.       answer "Configure next class?" with "OK" or "Cancel"
  38.       if it is "Cancel" then exit mouseUp
  39.     end if
  40.     put "This may take a few minutes" into msg
  41.     doSeatingChart
  42.     hide msg
  43.     set lockscreen to true
  44.     set cursor to 4
  45.     doProfiles
  46.     doGrades
  47.     doAttendance
  48.     set lockscreen to false
  49.   end repeat
  50.   go to first card
  51. end mouseUp
  52.  
  53. on doSeatingChart
  54.   global ClassName, period, numStudents,stackname
  55.   go to card "ClassListTemplate"
  56.   doMenu "Copy Card"
  57.   doMenu "New Stack..."
  58.   get the name of this stack
  59.   put word 2 of it into stackname
  60.   set name of this card to "SeatingChart"
  61.   put period into bkgnd field "Period"
  62.   put ClassName into bkgnd field "Class"
  63.   repeat with z = 2 to 36
  64.     set the script of field z to the script of field 1
  65.   end repeat
  66.   put 1 into counter
  67.   repeat with x = 0 to 5
  68.     repeat with y = 1 to 6
  69.       if counter > numStudents then exit doSeatingChart
  70.       put "Who sits in row" && x+1 && "and seat" && y & "?" into myquest
  71.       ask myquest
  72.       if word 1 of it is not empty then put counter + 1 into counter
  73.       put x * 6 + y into seat
  74.       put word 1 of it & return & word 2 of it into field seat
  75.     end repeat
  76.   end repeat
  77.   put tempScript into the script of field "date"
  78. end doSeatingChart
  79.  
  80. on DoProfiles
  81.   global ClassName, Period,A,B,C,D,stackname
  82.   go to card "ProfileTemplate" of SetUpStack
  83.   doMenu "Copy Card"
  84.   repeat with x = 1 to 36
  85.     go to last card of stackname
  86.     put word 1 of field x of card "SeatingChart" into temp1
  87.     put word 2 of field x of card "SeatingChart" into temp2
  88.     if temp1 is empty then
  89.       next repeat
  90.     end if
  91.     doMenu "Paste Card"
  92.     put A into card field "A"
  93.     put B into card field "B"
  94.     put C into card field "C"
  95.     put D into card field "D"
  96.     put temp1 && temp2 into field "Name"
  97.     put char 1 of temp1 & temp2 & "Profile" into cardname
  98.     get name of this card
  99.     set name of this card to cardname
  100.   end repeat
  101. end DoProfiles
  102.  
  103. on DoGrades
  104.   global ClassName, Period,stackname
  105.   go to card "GradesTemplate" of SetUpStack
  106.   doMenu "Copy Card"
  107.   repeat with x = 1 to 36
  108.     go to last card of stackname
  109.     put word 1 of field x of card "SeatingChart" into temp1
  110.     put word 2 of field x of card "SeatingChart" into temp2
  111.     if temp1 is empty then
  112.       next repeat
  113.     end if
  114.     doMenu "Paste Card"
  115.     put temp1 && temp2 into field "Name"
  116.     put char 1 of temp1 & temp2 & "Grades" into cardname
  117.     set name of this card to cardname
  118.     put ClassName into card field "Class"
  119.     put Period into card field "Period"
  120.   end repeat
  121. end DoGrades
  122.  
  123. on DoAttendance
  124.   global ClassName, period,stackname
  125.   go to card "AttendanceTemplate" of SetUpStack
  126.   doMenu "Copy Card"
  127.   repeat with x = 1 to 36
  128.     go to last card of stackname
  129.     put word 1 of field x of card "SeatingChart" into temp1
  130.     put word 2 of field x of card "SeatingChart" into temp2
  131.     if temp1 is empty then
  132.       next repeat
  133.     end if
  134.     doMenu "Paste Card"
  135.     put temp1 && temp2 into card field "Name"
  136.     put char 1 of temp1 & temp2 & "Attendance" into cardname
  137.     set name of this card to cardname
  138.     put ClassName into card field "Class"
  139.     put period into card field "Period"
  140.   end repeat
  141.   put "Your class record is now complete" into msg
  142. end DoAttendance
  143.  
  144.  
  145.  
  146.  
  147.  
  148. -- part 4 (field)
  149. -- low flags: 00
  150. -- high flags: 0004
  151. -- rect: left=59 top=115 right=230 bottom=201
  152. -- title width / last selected line: 0
  153. -- icon id / first selected line: 0 / 0
  154. -- text alignment: 0
  155. -- font id: 3
  156. -- text size: 12
  157. -- style flags: 0
  158. -- line height: 16
  159. -- part name: Title
  160.  
  161.  
  162. -- part 5 (field)
  163. -- low flags: 00
  164. -- high flags: 0004
  165. -- rect: left=214 top=115 right=231 bottom=244
  166. -- title width / last selected line: 0
  167. -- icon id / first selected line: 0 / 0
  168. -- text alignment: 0
  169. -- font id: 3
  170. -- text size: 12
  171. -- style flags: 0
  172. -- line height: 16
  173. -- part name: Period
  174.  
  175.  
  176. -- part 11 (field)
  177. -- low flags: 00
  178. -- high flags: 0004
  179. -- rect: left=267 top=115 right=231 bottom=310
  180. -- title width / last selected line: 0
  181. -- icon id / first selected line: 0 / 0
  182. -- text alignment: 0
  183. -- font id: 3
  184. -- text size: 12
  185. -- style flags: 0
  186. -- line height: 16
  187. -- part name: NumStudents
  188.  
  189.  
  190. -- part 12 (field)
  191. -- low flags: 00
  192. -- high flags: 4000
  193. -- rect: left=58 top=255 right=305 bottom=101
  194. -- title width / last selected line: 0
  195. -- icon id / first selected line: 0 / 0
  196. -- text alignment: 0
  197. -- font id: 3
  198. -- text size: 12
  199. -- style flags: 0
  200. -- line height: 16
  201. -- part name: A
  202.  
  203.  
  204. -- part 13 (field)
  205. -- low flags: 00
  206. -- high flags: 4000
  207. -- rect: left=120 top=255 right=305 bottom=166
  208. -- title width / last selected line: 0
  209. -- icon id / first selected line: 0 / 0
  210. -- text alignment: 0
  211. -- font id: 3
  212. -- text size: 12
  213. -- style flags: 0
  214. -- line height: 16
  215. -- part name: B
  216.  
  217.  
  218. -- part 14 (field)
  219. -- low flags: 00
  220. -- high flags: 4000
  221. -- rect: left=184 top=255 right=305 bottom=229
  222. -- title width / last selected line: 0
  223. -- icon id / first selected line: 0 / 0
  224. -- text alignment: 0
  225. -- font id: 3
  226. -- text size: 12
  227. -- style flags: 0
  228. -- line height: 16
  229. -- part name: C
  230.  
  231.  
  232. -- part 15 (field)
  233. -- low flags: 00
  234. -- high flags: 4000
  235. -- rect: left=254 top=255 right=305 bottom=301
  236. -- title width / last selected line: 0
  237. -- icon id / first selected line: 0 / 0
  238. -- text alignment: 0
  239. -- font id: 3
  240. -- text size: 12
  241. -- style flags: 0
  242. -- line height: 16
  243. -- part name: D
  244.  
  245.  
  246. -- part contents for card part 4
  247. ----- text -----
  248. English 10B
  249.  
  250. -- part contents for card part 5
  251. ----- text -----
  252. 1
  253.  
  254.  
  255. -- part contents for card part 11
  256. ----- text -----
  257. 3
  258.  
  259. -- part contents for card part 12
  260. ----- text -----
  261. 97.5
  262. 92.5
  263. 90.0
  264.  
  265. -- part contents for card part 13
  266. ----- text -----
  267. 87.5
  268. 82.5
  269. 80.0
  270. 77.5
  271.  
  272. -- part contents for card part 14
  273. ----- text -----
  274. 77.5
  275. 72.5
  276. 70.0
  277.  
  278. -- part contents for card part 15
  279. ----- text -----
  280. 67.5
  281. 62.5
  282. 60.0